home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / C / LIB / UNIXLIB37B / !UnixLib37 / src / stdio / c / perror < prev    next >
Text File  |  1996-11-09  |  713b  |  31 lines

  1. /****************************************************************************
  2.  *
  3.  * $Source: /unixb/home/unixlib/source/unixlib37/src/stdio/c/RCS/perror,v $
  4.  * $Date: 1996/04/19 21:32:42 $
  5.  * $Revision: 1.1 $
  6.  * $State: Rel $
  7.  * $Author: simon $
  8.  *
  9.  * $Log: perror,v $
  10.  * Revision 1.1  1996/04/19 21:32:42  simon
  11.  * Initial revision
  12.  *
  13.  ***************************************************************************/
  14.  
  15. static const char rcs_id[] = "$Id: perror,v 1.1 1996/04/19 21:32:42 simon Rel $";
  16.  
  17. #include <errno.h>
  18. #include <stdio.h>
  19.  
  20. __STDIOLIB__
  21.  
  22. void
  23. perror (register const char *s)
  24. {
  25.   if (!s)
  26.     s = "";
  27.  
  28.   fprintf (stderr, "%s: %s\n", s,
  29.        (errno < sys_nerr) ? sys_errlist[errno] : "Unknown Error");
  30. }
  31.